#include <stdio.h>
#include <math.h>

// 函数用于判断三边长能否构成三角形
int isTriangle(double a, double b, double c) {
    if ((a + b > c) && (a + c > b) && (b + c > a)) {
        return 1;
    } else {
        return 0;
    }
}

// 函数用于计算三角形面积
double triangleArea(double a, double b, double c) {
    double p = (a + b + c) / 2;
    if (isTriangle(a, b, c)) {
        return sqrt(p * (p - a) * (p - b) * (p - c));
    } else {
        printf("输入的三边长不能构成三角形\n");
        return -1;
    }
}

int main() {
    double side1, side2, side3;
    printf("请输入三角形的三条边长：\n");
    scanf("%lf %lf %lf", &side1, &side2, &side3);

    double area = triangleArea(side1, side2, side3);
    if (area >= 0) {
        printf("三角形的面积为: %.2lf\n", area);
    }

    return 0;
}